package cn.jingyinghui.testlambda.testlambdaimpl;

import cn.jingyinghui.testlambda.AppleFormatterInter;
import cn.jingyinghui.testlambda.pojo.Apple;

public class AppleGeneralFormatter implements AppleFormatterInter {
    @Override
    public String accept(Apple apple) {

        String isHeavyApple = apple.getWeight()>150 ? "重" : "轻";

        return "一个 " + isHeavyApple + " 苹果" ;
    }
}
